home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / GXPrinterDrivers.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  42KB  |  1,065 lines

  1. /*
  2.      File:        GXPrinterDrivers.h
  3.  
  4.      Contains:    This file defines data types and API functions for printer driver development.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __GXPRINTERDRIVERS__
  19. #define __GXPRINTERDRIVERS__
  20.  
  21. #ifndef __SCALERTYPES__
  22. #include <ScalerTypes.h>
  23. #endif
  24. #ifndef __GXMESSAGES__
  25. #include <GXMessages.h>
  26. #endif
  27. #ifndef __PRINTING__
  28. #include <Printing.h>
  29. #endif
  30. #ifndef __GXPRINTING__
  31. #include <GXPrinting.h>
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT_SUPPORTED
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_ALIGN_SUPPORTED
  43. #pragma options align=mac68k
  44. #endif
  45.  
  46. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  47. /*
  48.  ------------------------------------------------------------------------------
  49.  
  50.                         Desktop Printer Constants and Types
  51.  
  52. -------------------------------------------------------------------------------- 
  53. */
  54. /* Manual feed alert preferences structure for gxManualFeedAlertPrefsType desktop printer resource */
  55. struct gxManualFeedAlertPrefs {
  56.     long                             alertFlags;                    /*    Flags--first word is for driver's private use, the rest is predefined. */
  57. };
  58. typedef struct gxManualFeedAlertPrefs gxManualFeedAlertPrefs;
  59.  
  60. typedef gxManualFeedAlertPrefs *gxManualFeedAlertPrefsPtr;
  61. typedef gxManualFeedAlertPrefsPtr *gxManualFeedAlertPrefsHdl;
  62. /* Constants for the alertFlags field of gxManualFeedAlertPrefs.*/
  63.  
  64. enum {
  65.     gxShowAlerts                = 0x00000001,                    /* Show alerts for this desktop printer. */
  66.     gxAlertOnPaperChange        = 0x00000002                    /* ...only if the papertype changes. */
  67. };
  68.  
  69.  
  70. enum {
  71.     gxDefaultMFeedAlertSettings    = (gxShowAlerts | gxAlertOnPaperChange)
  72. };
  73.  
  74. /* Driver output settings structure for desktop printer gxDriverOutputType resource */
  75. struct gxDriverOutputSettings {
  76.     long                             driverflags;                /*    Flags -- for use by driver. */
  77.     long                             outputSettings;                /*    Flags -- predefined. */
  78. };
  79. typedef struct gxDriverOutputSettings gxDriverOutputSettings;
  80.  
  81. typedef gxDriverOutputSettings *gxDriverOutputSettingsPtr;
  82. typedef gxDriverOutputSettingsPtr *gxDriverOutputSettingsHdl;
  83. /* Constants for the outputSettings field of gxDriverOutputSettings. */
  84.  
  85. enum {
  86.     gxCanConfigureTrays            = 0x00000001                    /* Desktop printer represents a device with a paper feed. */
  87. };
  88.  
  89. /*
  90.  ------------------------------------------------------------------------------
  91.  
  92.                         Printing Driver Constants and Types
  93.  
  94. -------------------------------------------------------------------------------- 
  95. */
  96.  
  97. enum {
  98.     gxInputTraysMenuItem        = -1                            /* Menu item number for "Input Trays..." */
  99. };
  100.  
  101. /* Buffering and IO preferences-- this structure mirrors the 'iobm' resource */
  102. struct gxIOPrefsRec {
  103.     unsigned long                     communicationsOptions;        /* Standard or nonstandard I/O? */
  104.     unsigned long                     numBuffers;                    /* Requested number of buffers for QDGX to create */
  105.     unsigned long                     bufferSize;                    /* The size of each buffer */
  106.     unsigned long                     numReqBlocks;                /* The number of async I/O request blocks which will be needed */
  107.     unsigned long                     openCloseTimeout;            /* The open/close timeout (in ticks) */
  108.     unsigned long                     readWriteTimeout;            /* The read/write timeout (in ticks) */
  109. };
  110. typedef struct gxIOPrefsRec gxIOPrefsRec;
  111.  
  112. typedef gxIOPrefsRec *gxIOPrefsPtr;
  113. typedef gxIOPrefsPtr *gxIOPrefsHdl;
  114. /* Constants for the communicationsOptions field of IOPrefsRec. */
  115.  
  116. enum {
  117.     gxUseCustomIO                = 0x00000001                    /* Driver uses a non-standard IO mechanism */
  118. };
  119.  
  120. /* Information about writing to a file */
  121. struct gxPrintDestinationRec {
  122.     Boolean                         printToFile;                /* True if output is to go to a file */
  123.     char                             padByte;
  124.     FSSpec                             fSpec;                        /* If going to a file, the FSSpec for the file */
  125.     char                             includeFonts;                /* True if fonts are to be included */
  126.     char                             pad2;
  127.     Str31                             fileFormat;                    /* Format to write file */
  128. };
  129. typedef struct gxPrintDestinationRec gxPrintDestinationRec;
  130.  
  131. typedef gxPrintDestinationRec *gxPrintDestinationPtr;
  132. typedef gxPrintDestinationPtr *gxPrintDestinationHdl;
  133. /* This structure is the content of each cell in the standard PACK LDEF */
  134. struct gxPortListRec {
  135.     char                             firstMarker;                /* Markers to indicate icon or non-icon version */
  136.     char                             secondMarker;                /* if these are ~= and ~=, then the cell is an icon cell. */
  137.                                                                 /* Otherwise, it is assumed to be a standard text LDEF */
  138.                                                                 /* cell */
  139.  
  140.     Handle                             iconSuiteHandle;            /* The icon suite to draw for this cell */
  141.     Handle                             outputDriverName;            /* Handle to the output driver name (for serial) */
  142.     Handle                             inputDriverName;            /* Handle to the input driver name (for serial) */
  143.     Str255                             iconName;                    /* Name to draw under the icon */
  144. };
  145. typedef struct gxPortListRec gxPortListRec;
  146.  
  147. typedef gxPortListRec *gxPortListPtr;
  148. /*
  149.  ------------------------------------------------------------------------------
  150.  
  151.                         Printing Driver Constants for resources in the desktop printer
  152.  
  153. -------------------------------------------------------------------------------- 
  154. */
  155.  
  156. enum {
  157.     gxDeviceCommunicationsID    = 0
  158. };
  159.  
  160. /* ----------------------------------* 'prod' *---------------------------------- */
  161. /*
  162.       For PostScript devices, the device and version names of the device.
  163.       (0) product name is of type PString
  164.       (1) version is of type PString
  165.       (2) revision is of type PString
  166.       (3) vm available is of type long
  167.       (4) font stream type is of type scalerStreamTypeFlag
  168.       (5) language level is of type long
  169. */
  170.  
  171. enum {
  172.     gxPostscriptProductInfoType    = 'prod',
  173.     gxPostscriptProductNameID    = 0,
  174.     gxPostscriptVersionID        = 1,
  175.     gxPostscriptRevisionID        = 2,
  176.     gxPostscriptVMAvailableID    = 3,
  177.     gxPostscriptFontStreamTypeID = 4,
  178.     gxPostscriptLanguageLevelID    = 5
  179. };
  180.  
  181. /* PPD support definitions*/
  182.  
  183. enum {
  184.     gxPPDInformationTag            = 'ppda',                        /* tag used for job collection*/
  185.     gxPPDInformationTagID        = gxPrintingTagID                /* ID for job collection tag*/
  186. };
  187.  
  188.  
  189. enum {
  190.     gxPPDInformationType        = gxPPDInformationTag,            /* rsource type as stored in desktop printer*/
  191.     gxPPDInformationResID        = gxPrintingDriverBaseID        /* ID of rsource stored in desktop printer*/
  192. };
  193.  
  194. struct gxPPDFileInfoRec {
  195.     unsigned long                     dataOffset;                    /* byte offset to beginning of ppd data*/
  196.     unsigned long                     dataLength;                    /* length of ppd data*/
  197.     unsigned long                     reserved;                    /* reserved*/
  198.     unsigned long                     aliasRecordSize;            /* size of alias record below*/
  199.     unsigned char                     ppdAlias[1];                /* the actual alias record data*/
  200. };
  201. typedef struct gxPPDFileInfoRec gxPPDFileInfoRec;
  202.  
  203. typedef gxPPDFileInfoRec *gxPPDFileInfoPtr;
  204. typedef gxPPDFileInfoPtr *gxPPDFileInfoHdl;
  205. /*
  206.  ------------------------------------------------------------------------------
  207.  
  208.                         Printing Driver Constants for status alerts
  209.  
  210. -------------------------------------------------------------------------------- 
  211. */
  212. /* Structure passed in statusBuffer of StatusRecord for manual feed alert */
  213. struct gxManualFeedRecord {
  214.     Boolean                         canAutoFeed;                /* True if driver can switch to auto feed */
  215.     char                             pad1;
  216.     Str31                             paperTypeName;                /* Name of paperType to feed manually */
  217. };
  218. typedef struct gxManualFeedRecord gxManualFeedRecord;
  219.  
  220. /* Structure passed in statusBuffer of StatusRecord for out of paper alert */
  221. struct gxOutOfPaperRecord {
  222.     Str31                             paperTypeName;                /* Name of printing document */
  223. };
  224. typedef struct gxOutOfPaperRecord gxOutOfPaperRecord;
  225.  
  226. /* The DITL id for the auto feed button in the manual feed alert */
  227.  
  228. enum {
  229.     gxAutoFeedButtonId            = 3
  230. };
  231.  
  232. /* Status resource id for the alerts */
  233.  
  234. enum {
  235.     gxUnivAlertStatusResourceId    = -28508
  236. };
  237.  
  238. /* Status resource indices for alerts */
  239.  
  240. enum {
  241.     gxUnivSetTrayIndex            = 0,
  242.     gxUnivManualFeedIndex        = 2,
  243.     gxUnivFailToPrintIndex        = 3,
  244.     gxUnivPaperJamIndex            = 4,
  245.     gxUnivOutOfPaperIndex        = 5,
  246.     gxUnivNoPaperTrayIndex        = 6,
  247.     gxUnivPrinterReadyIndex        = 7,
  248.     gxUnivAlertBeforeIndex        = 9,
  249.     gxUnivAlertAfterIndex        = 10
  250. };
  251.  
  252. /* Allocation sizes for status buffers needed for automatic alerts */
  253.  
  254. enum {
  255.     gxDefaultStatusBufferSize    = 10,
  256.     gxManualFeedStatusBufferSize = 34,
  257.     gxOutOfPaperStatusBufferSize = 42
  258. };
  259.  
  260. /*
  261.  ------------------------------------------------------------------------------
  262.  
  263.                                 Old Application Support
  264.  
  265. -------------------------------------------------------------------------------- 
  266. */
  267. /* The format of a 'cust' resource  */
  268. struct gxCustomizationRec {
  269.     short                             horizontalResolution;        /* Horizontal res (integral part) */
  270.     short                             verticalResolution;            /* Vertical res (integral part) */
  271.     short                             upDriverType;                /* "upDriver" emulation type */
  272.     Point                             patternStretch;                /* Pattern stretch factor */
  273.     short                             translatorSettings;            /* Translator settings to use */
  274. };
  275. typedef struct gxCustomizationRec gxCustomizationRec;
  276.  
  277. typedef gxCustomizationRec *gxCustomizationPtr;
  278. typedef gxCustomizationPtr *gxCustomizationHdl;
  279. /* The format of a 'resl' resource */
  280. struct gxResolutionRec {
  281.     short                             rangeType;                    /* Always 1 */
  282.     short                             xMinimumResolution;            /* Min X resolution available */
  283.     short                             xMaximumResolution;            /* Max X resolution available */
  284.     short                             yMinimumResolution;            /* Min Y resolution available */
  285.     short                             yMaximumResolution;            /* Max Y resolution available */
  286.     short                             resolutionCount;            /* Number of resolutions */
  287.     Point                             resolutions[1];                /* Array of resolutions */
  288. };
  289. typedef struct gxResolutionRec gxResolutionRec;
  290.  
  291. typedef gxResolutionRec *gxResolutionPtr;
  292. typedef gxResolutionPtr *gxResolutionHdl;
  293. /*
  294.  
  295.         Constants for the "universal" print record.
  296.  
  297. */
  298. /* Constant for version number in universal print record */
  299.  
  300. enum {
  301.     gxPrintRecordVersion        = 8
  302. };
  303.  
  304. /* Constants for feed field in universal print record */
  305.  
  306. enum {
  307.     gxAutoFeed                    = 0,
  308.     gxManualFeed                = 1
  309. };
  310.  
  311. /* Constants for options field in universal print record */
  312.  
  313. enum {
  314.     gxPreciseBitmap                = 0x0001,                        /* Tall adjusted (IW), precise bitmap (LW, SC) */
  315.     gxBiggerPages                = 0x0002,                        /* No gaps (IW), larger print area (LW) */
  316.     gxGraphicSmoothing            = 0x0004,                        /* Graphic smoothing (LW) */
  317.     gxTextSmoothing                = 0x0008,                        /* Text smoothing (SC) */
  318.     gxFontSubstitution            = 0x0010,                        /* Font substitution */
  319.     gxInvertPage                = 0x0020,                        /* B/W invert image */
  320.     gxFlipPageHoriz                = 0x0040,                        /* Flip horizontal */
  321.     gxFlipPageVert                = 0x0080,                        /* Flip vertical */
  322.     gxColorMode                    = 0x0100,                        /* Color printing */
  323.     gxBidirectional                = 0x0200,                        /* Bidirectional printing */
  324.     gxUserFlag0                    = 0x0400,                        /* User flag 0 */
  325.     gxUserFlag1                    = 0x0800,                        /* User flag 1 */
  326.     gxUserFlag2                    = 0x1000,                        /* User flag 2 */
  327.     gxReservedFlag0                = 0x2000,                        /* Reserved flag 0 */
  328.     gxReservedFlag1                = 0x4000,                        /* Reserved flag 1 */
  329.     gxReservedFlag2                = 0x8000                        /* Reserved flag 2 */
  330. };
  331.  
  332. /* Constants for orientation field in universal print record */
  333.  
  334. enum {
  335.     gxPortraitOrientation        = 0,
  336.     gxLandscapeOrientation        = 1,
  337.     gxAltPortraitOrientation    = 2,
  338.     gxAltLandscapeOrientation    = 3
  339. };
  340.  
  341. /* Constants for qualityMode field in universal print record */
  342.  
  343. enum {
  344.     gxBestQuality                = 0,
  345.     gxFasterQuality                = 1,
  346.     gxDraftQuality                = 2
  347. };
  348.  
  349. /* Constants for firstTray and remainingTray fields in universal print record */
  350.  
  351. enum {
  352.     gxFirstTray                    = 0,
  353.     gxSecondTray                = 1,
  354.     gxThirdTray                    = 2
  355. };
  356.  
  357. /* Constants for coverPage field in universal print record */
  358.  
  359. enum {
  360.     gxNoCoverPage                = 0,
  361.     gxFirstPageCover            = 1,
  362.     gxLastPageCover                = 2
  363. };
  364.  
  365. /* Constants for headMotion field in universal print record */
  366.  
  367. enum {
  368.     gxUnidirectionalMotion        = 0,
  369.     gxBidirectionalMotion        = 1
  370. };
  371.  
  372. /* Constants for saveFile field in universal print record */
  373.  
  374. enum {
  375.     gxNoFile                    = 0,
  376.     gxPostScriptFile            = 1
  377. };
  378.  
  379. #endif
  380. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  381. /* The format of the "universal" print record */
  382. struct gxUniversalPrintRecord {
  383.     short                             printRecordVersion;            /* Print record version */
  384.                                                                 /* prInfo subrecord */
  385.     short                             appDev;                        /* Device kind, always 0 */
  386.     short                             appVRes;                    /* Application vertical resolution */
  387.     short                             appHRes;                    /* Application horizontal resolution */
  388.     Rect                             appPage;                    /* Page size, in application resolution */
  389.     Rect                             appPaper;                    /* Paper rectangle [offset from rPage] */
  390.                                                                 /* prStl subrecord */
  391.     short                             devType;                    /* Device type, always 0xA900 (was wDev) */
  392.     short                             pageV;                        /* Page height in 120ths of an inch */
  393.     short                             pageH;                        /* Page width in 120ths of an inch */
  394.     char                             fillByte;                    /* Page calculation mode */
  395.     char                             feed;                        /* Feed mode */
  396.                                                                 /* prInfoPT subrecord */
  397.     short                             devKind;                    /* Device kind, always 0 */
  398.     short                             devVRes;                    /* Device vertical resolution */
  399.     short                             devHRes;                    /* Device horizontal resolution */
  400.     Rect                             devPage;                    /* Device page size */
  401.                                                                 /* prXInfo subrecord */
  402.     short                             actualCopies;                /* Actual number of copies for this job */
  403.     short                             options;                    /* Options for this device */
  404.     short                             reduction;                    /* Reduce/enlarge factor */
  405.     char                             orientation;                /* Orientation of paper ( 0=portrait, 1=landscape ) */
  406.                                                                 /* Clusters and PopUps */
  407.     char                             qualityMode;                /* Quality mode */
  408.     char                             coverPage;                    /* Cover page */
  409.     char                             firstTray;                    /* First feed tray */
  410.     char                             remainingTray;                /* Remaining feed tray */
  411.     char                             headMotion;                    /* Head motion */
  412.     char                             saveFile;                    /* Save file */
  413.     char                             userCluster1;                /* Three clusters left over */
  414.     char                             userCluster2;
  415.     char                             userCluster3;
  416.                                                                 /* prJob subrecord */
  417.     short                             firstPage;                    /* First page */
  418.     short                             lastPage;                    /* Last page */
  419.     short                             copies;                        /* Number of copies, always 1 */
  420.     char                             reserved1;                    /* Always true, unused */
  421.     char                             reserved2;                    /* Always true, unused */
  422.     PrIdleUPP                         pIdleProc;                    /* Idle proc */
  423.     Ptr                             pFileName;                    /* Spool file name pointer */
  424.     short                             fileVol;                    /* Spool file vRefNum */
  425.     char                             fileVers;                    /* File version, must be 0 */
  426.     char                             reserved3;                    /* Always 0 */
  427.     short                             printX[19];                    /* Internal use */
  428. };
  429. typedef struct gxUniversalPrintRecord gxUniversalPrintRecord;
  430.  
  431. typedef gxUniversalPrintRecord *gxUniversalPrintRecordPtr;
  432. typedef gxUniversalPrintRecordPtr *gxUniversalPrintRecordHdl;
  433. #endif
  434. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  435. /*
  436.  ------------------------------------------------------------------------------
  437.  
  438.                             Compatibility Printing Messages
  439.  
  440. -------------------------------------------------------------------------------- 
  441. */
  442. #define Forward_GXPrOpenDoc(hPrint, pPort) \
  443.         ForwardThisMessage((void *) (hPrint), (void *) (pPort))
  444.  
  445. #define Forward_GXPrCloseDoc(pPort) \
  446.         ForwardThisMessage((void *) (pPort))
  447.  
  448. #define Forward_GXPrOpenPage(pPort, pRect, resolution) \
  449.         ForwardThisMessage((void *) (pPort), (void *) (pRect), (void *) (resolution))
  450.  
  451. #define Forward_GXPrClosePage(pPort) \
  452.         ForwardThisMessage((void *) (pPort))
  453.  
  454. #define Forward_GXPrintDefault(hPrint) \
  455.         ForwardThisMessage((void *) (hPrint))
  456.  
  457. #define Forward_GXPrStlDialog(hPrint, confirmed) \
  458.         ForwardThisMessage((void *) (hPrint), (void *) (confirmed))
  459.  
  460. #define Forward_GXPrJobDialog(hPrint, confirmed) \
  461.         ForwardThisMessage((void *) (hPrint), (void *) (confirmed))
  462.  
  463. #define Forward_GXPrStlInit(hPrint, pDlg) \
  464.         ForwardThisMessage((void *) (hPrint), (void *) (pDlg))
  465.  
  466. #define Forward_GXPrJobInit(hPrint, pDlg) \
  467.         ForwardThisMessage((void *) (hPrint), (void *) (pDlg))
  468.  
  469. #define Forward_GXPrDlgMain(hPrint, initProc, confirmed) \
  470.         ForwardThisMessage((void *) (hPrint), (void *) (initProc), (void *) (confirmed))
  471.  
  472. #define Forward_GXPrValidate(hPrint, changedPrintRecord) \
  473.         ForwardThisMessage((void *) (hPrint), (void *) (changedPrintRecord))
  474.  
  475. #define Forward_GXPrJobMerge(srcPrint, destPrint) \
  476.         ForwardThisMessage((void *) (srcPrint), (void *) (destPrint))
  477.  
  478. #define Forward_GXPrGeneral(dataPtr) \
  479.         ForwardThisMessage((void *) (dataPtr))
  480.  
  481. #define Forward_GXConvertPrintRecordTo(hPrint) \
  482.         ForwardThisMessage((void *) (hPrint))
  483.  
  484. #define Forward_GXConvertPrintRecordFrom(hPrint) \
  485.         ForwardThisMessage((void *) (hPrint))
  486.  
  487. #define Forward_GXPrintRecordToJob(hPrint, aJob) \
  488.         ForwardThisMessage((void *) (hPrint), (void *) (aJob))
  489. /*
  490.  ------------------------------------------------------------------------------
  491.  
  492.                         Raster Driver Contants and Types
  493.  
  494. -------------------------------------------------------------------------------- 
  495. */
  496. typedef long gxRasterPlaneOptions;
  497. /* Input structure for setting up the offscreen */
  498. struct gxPlaneSetupRec {
  499.     gxRasterPlaneOptions             planeOptions;                /* Options for the offscreen package */
  500.     gxHalftone                         planeHalftone;                /* OPTIONAL: halftone structure for this plane */
  501.     gxColorSpace                     planeSpace;                    /* OPTIONAL: noSpace will get the graphics default */
  502.     gxColorSet                         planeSet;                    /* OPTIONAL: NIL gets the default */
  503.     gxColorProfile                     planeProfile;                /* OPTIONAL: NIL gets no matching */
  504. };
  505. typedef struct gxPlaneSetupRec gxPlaneSetupRec;
  506.  
  507. /* Constants for planeOptions field in gxPlaneSetupRec */
  508.  
  509. enum {
  510.     gxDefaultOffscreen            = 0x00000000,                    /* Default value - bits are allocated for the client, halftoning takes place */
  511.     gxDontSetHalftone            = 0x00000001,                    /* Don't call SetViewPortHalftone */
  512.     gxDotTypeIsDitherLevel        = 0x00000002                    /* Call SetViewPortDither using the dotType as the level */
  513. };
  514.  
  515. struct gxOffscreenSetupRec {
  516.     short                             width;                        /* Width in pixels */
  517.     short                             minHeight;                    /* Minimum height in pixels - actual height returned here */
  518.     short                             maxHeight;                    /* Maximum height in pixels */
  519.     Fixed                             ramPercentage;                /* Maximum percentage of RAM to take */
  520.     long                             ramSlop;                    /* Amount of RAM to be sure to leave */
  521.     short                             depth;                        /* Depths in bits of each plane */
  522.     gxMapping                         vpMapping;                    /* Mapping to assign to offscreen viewPorts */
  523.     gxMapping                         vdMapping;                    /* Mapping to assign to offscreen viewDevices */
  524.     short                             planes;                        /* Number of planes to allocate of depth bits each (can be more than 4) */
  525.     gxPlaneSetupRec                 planeSetup[4];                /* Parameters for each plane, 4 is provided because it is most handy for writers of devices */
  526. };
  527. typedef struct gxOffscreenSetupRec gxOffscreenSetupRec;
  528.  
  529. /* The format of one plane in the offscreen planar area */
  530. struct gxOffscreenPlaneRec {
  531.     gxViewPort                         theViewPort;                /* viewPort for the offscreen */
  532.     gxViewDevice                     theDevice;                    /* viewDevice for the offscreen */
  533.     gxViewGroup                     theViewGroup;                /* The viewGroup that they share */
  534.     gxShape                         theBitmap;                    /* The offscreen bitmap shape */
  535.     gxBitmap                         theBits;                    /* The bits of the offscreen */
  536. };
  537. typedef struct gxOffscreenPlaneRec gxOffscreenPlaneRec;
  538.  
  539. /* The format of an entire offscreen area */
  540. struct gxOffscreenRec {
  541.     short                             numberOfPlanes;                /* Number of planes we have */
  542.     Handle                             offscreenStorage;            /* Handle containing the bitmaps image data */
  543.     gxOffscreenPlaneRec             thePlanes[1];                /* Planes to draw in */
  544. };
  545. typedef struct gxOffscreenRec gxOffscreenRec;
  546.  
  547. typedef gxOffscreenRec *gxOffscreenPtr;
  548. typedef gxOffscreenPtr *gxOffscreenHdl;
  549. typedef long gxRasterRenderOptions;
  550. /* Structure that mirrors 'rdip' resource. */
  551. struct gxRasterPrefsRec {
  552.     gxRasterRenderOptions             renderOptions;                /* Options for the raster imaging system */
  553.     Fixed                             hImageRes;                    /* Horizontal resolution to image at */
  554.     Fixed                             vImageRes;                    /* Vertical resolution to image at */
  555.     short                             minBandSize;                /* Minimum band size to use (in pixels) */
  556.     short                             maxBandSize;                /* Maximum band size to use (in pixels), 0 == entire page */
  557.     Fixed                             ramPercentage;                /* Maximum percentage of RAM to take */
  558.     long                             ramSlop;                    /* Amount of RAM to be sure to leave */
  559.     short                             depth;                        /* Depth in pixels (PER PLANE!) */
  560.     short                             numPlanes;                    /* Number of planes to render */
  561.     gxPlaneSetupRec                 planeSetup[1];                /* One for each plane */
  562. };
  563. typedef struct gxRasterPrefsRec gxRasterPrefsRec;
  564.  
  565. /* Constants for renderOptions field in gxRasterPrefsRec. */
  566.  
  567. enum {
  568.     gxDefaultRaster                = 0x00000000,                    /* Default raster options */
  569.     gxDontResolveTransferModes    = 0x00000001,                    /* 0=Resolve, 1=Don't Resolve */
  570.     gxRenderInReverse            = 0x00000002,                    /* Traverse image in reverse order */
  571.     gxOnePlaneAtATime            = 0x00000004,                    /* Render each plane separately */
  572.     gxSendAllBands                = 0x00000008                    /* Send even empty bands */
  573. };
  574.  
  575. typedef gxRasterPrefsRec *gxRasterPrefsPtr;
  576. typedef gxRasterPrefsPtr *gxRasterPrefsHdl;
  577. typedef long gxRasterPackageOptions;
  578. /* Structure that mirrors 'rpck' resource. */
  579. struct gxRasterPackageRec {
  580.     Ptr                             bufferSize;                    /* Buffer size for packaging (>= maximum head pass size) */
  581.     short                             colorPasses;                /* 1 (b/w) or 4 (CMYK) is typical */
  582.     short                             headHeight;                    /* Printhead height in pixels */
  583.     short                             numberPasses;                /* Number of head passes it takes to == iHeadHeight */
  584.     short                             passOffset;                    /* Offset between passes, in pixels */
  585.     gxRasterPackageOptions             packageOptions;                /* Packaging options */
  586. };
  587. typedef struct gxRasterPackageRec gxRasterPackageRec;
  588.  
  589. typedef gxRasterPackageRec *gxRasterPackagePtr;
  590. typedef gxRasterPackagePtr *gxRasterPackageHdl;
  591. /* Constants for packageOptions field in gxRasterPackageRec. */
  592.  
  593. enum {
  594.     gxSendAllColors                = 0x00000001,                    /* Send even clean bands through */
  595.     gxInterlaceColor            = 0x00000002,                    /* Ribbon contamination is a concern */
  596.     gxOverlayColor                = 0x00000004,                    /* Color printer without a ribbon problem */
  597.     gxUseColor                    = (gxInterlaceColor | gxOverlayColor) /* This is a color printer */
  598. };
  599.  
  600. /* Structure for RasterPackageBitmap message */
  601. struct gxRasterPackageBitmapRec {
  602.     gxBitmap *                        bitmapToPackage;            /* Bitmap containing the data to package */
  603.     unsigned short                     startRaster;                /* Raster to begin the packaging from */
  604.     unsigned short                     colorBand;                    /* For which color pass this is a packaging request */
  605.     Boolean                         isBandDirty;                /* Whether there are any dirty bits in this band */
  606.     char                             padByte;
  607.     Rect                             dirtyRect;                    /* Which bits are dirty */
  608. };
  609. typedef struct gxRasterPackageBitmapRec gxRasterPackageBitmapRec;
  610.  
  611. /* Structure of number record in gxRasterPackageControlsRec */
  612. struct gxStandardNumberRec {
  613.     short                             numberType;                    /* Type of numberic output desired */
  614.     short                             minWidth;                    /* Minimum output width of the number */
  615.     char                             padChar;                    /* Pad character for numbers shorter than the minWidth */
  616.     char                             padChar2;
  617.     Str31                             startString;                /* Prefix string */
  618.     Str31                             endString;                    /* Postfix string */
  619. };
  620. typedef struct gxStandardNumberRec gxStandardNumberRec;
  621.  
  622. typedef gxStandardNumberRec *gxStandardNumberPtr;
  623. /* Structure that mirrors 'ropt' resource */
  624. struct gxRasterPackageControlsRec {
  625.     short                             startPageStringID;            /* 'wstr' to send to the device at start of page */
  626.     short                             formFeedStringID;            /* 'wstr' to send to the device to cause a form feed */
  627.     short                             forwardMax;                    /* Line feed strings */
  628.     gxStandardNumberRec             forwardLineFeed;            /* Number record for forward line feed */
  629.     short                             reverseMax;                    /* Max number of reverse line feeds device can do */
  630.     gxStandardNumberRec             reverseLineFeed;            /* Number record for forward line feed */
  631. };
  632. typedef struct gxRasterPackageControlsRec gxRasterPackageControlsRec;
  633.  
  634. typedef gxRasterPackageControlsRec *gxRasterPackageControlsPtr;
  635. typedef gxRasterPackageControlsPtr *gxRasterPackageControlsHdl;
  636. /* Raster imaging system imageData structure */
  637. struct gxRasterImageDataRec {
  638.     gxRasterRenderOptions             renderOptions;                /* Options for the raster imaging system */
  639.     Fixed                             hImageRes;                    /* horizontal resolution to image at */
  640.     Fixed                             vImageRes;                    /* vertical resolution to image at */
  641.     short                             minBandSize;                /* smallest band that makes sense for this device */
  642.     short                             maxBandSize;                /* biggest band that makes sense, or 0 for "full page" */
  643.     gxRectangle                     pageSize;                    /* size of page for device */
  644.  
  645.                                                                 /* Values used within the RasterDataIn message */
  646.  
  647.     short                             currentYPos;                /* Current position moving down the page */
  648.     gxRasterPackageRec                 packagingInfo;                /* Raster packaging record */
  649.  
  650.                                                                 /* Values used within the remaining messages */
  651.  
  652.     Boolean                         optionsValid;                /* Were options specified by the driver? */
  653.     char                             padByte;
  654.     gxRasterPackageControlsRec         packageControls;            /* Options for the packaging messages */
  655.     gxOffscreenSetupRec             theSetup;                    /* setup for the offscreen code, variable length componant */
  656. };
  657. typedef struct gxRasterImageDataRec gxRasterImageDataRec;
  658.  
  659. typedef gxRasterImageDataRec *gxRasterImageDataPtr;
  660. typedef gxRasterImageDataPtr *gxRasterImageDataHdl;
  661. /*
  662.  ------------------------------------------------------------------------------
  663.  
  664.                                 Raster Driver Imaging Messages
  665.  
  666. -------------------------------------------------------------------------------- 
  667. */
  668. #define Send_GXRasterDataIn(offScreen, bandRectangle, dirtyRectangle) \
  669.         SendMessage(0x00010000, offScreen, bandRectangle, dirtyRectangle)
  670.  
  671. #define Forward_GXRasterDataIn(offScreen, bandRectangle, dirtyRectangle) \
  672.         ForwardThisMessage((void *) (offScreen), (void *) (bandRectangle), (void *) (dirtyRectangle))
  673.  
  674. #define Send_GXRasterLineFeed(lineFeedSize, buffer, bufferPos, imageDataHdl) \
  675.         SendMessage(0x00010001, lineFeedSize, buffer, bufferPos, imageDataHdl)
  676.  
  677. #define Forward_GXRasterLineFeed(lineFeedSize, buffer, bufferPos, imageDataHdl) \
  678.         ForwardThisMessage((void *) (lineFeedSize), (void *) (buffer), (void *) (bufferPos), (void *) (imageDataHdl))
  679.  
  680. #define Send_GXRasterPackageBitmap(whatToPackage, buffer, bufferPos, imageDataHdl) \
  681.         SendMessage(0x00010002, whatToPackage, buffer, bufferPos, imageDataHdl)
  682.  
  683. #define Forward_GXRasterPackageBitmap(whatToPackage, buffer, bufferPos, imageDataHdl) \
  684.         ForwardThisMessage((void *) (whatToPackage), (void *) (buffer), (void *) (bufferPos), (void *) (imageDataHdl))
  685. /*
  686.  ------------------------------------------------------------------------------
  687.  
  688.                         Vector Driver Contants and Types
  689.  
  690. -------------------------------------------------------------------------------- 
  691. */
  692. /* Vector device halftone component record */
  693. struct gxVHalftoneCompRec {
  694.     Fixed                             angle;                        /* Angle to halftone at. Must be 0, 90, 45 or 135 */
  695.     long                             penIndex;                    /* index of the pen to draw this component with */
  696. };
  697. typedef struct gxVHalftoneCompRec gxVHalftoneCompRec;
  698.  
  699. /* Vector device halftone record */
  700. struct gxVHalftoneRec {
  701.     gxColorSpace                     halftoneSpace;
  702.     gxVHalftoneCompRec                 halftoneComps[4];            /* Info for each color component */
  703.     long                             penIndexForBW;                /* Pen index to draw one bit deep or black and white bitmap with */
  704. };
  705. typedef struct gxVHalftoneRec gxVHalftoneRec;
  706.  
  707. /* Vector shape rendering information */
  708. typedef long gxVectorShapeOptions;
  709. struct gxVectorShapeDataRec {
  710.     gxVectorShapeOptions             shapeOptions;                /* Options to control shape handling */
  711.     long                             maxPolyPoints;                /* Maximum number of polygon points that device can support */
  712.     Fixed                             shapeError;                    /* Defines allowed deviation from the original shape */
  713.     Fixed                             textSize;                    /* Text above this size is filled; text below this size is outlined */
  714.     Fixed                             frameSize;                    /* Frame's smaller than this -> shape stroked; frame's larger -> shape is filled */
  715. };
  716. typedef struct gxVectorShapeDataRec gxVectorShapeDataRec;
  717.  
  718. /* Constants for shapeOptions field in gxVectorShapeDataRec. */
  719.  
  720. enum {
  721.     gxUnidirectionalFill        = 0x00000001,                    /* Generate scanlines in one direction only.  Useful for transparencies */
  722.     gxAlsoOutlineFilledShape    = 0x00000002                    /* Turn on this bit to also outline solid filled shapes */
  723. };
  724.  
  725. /* Vector device rendering information */
  726. typedef long gxVectorRenderOptions;
  727. /* Vector imaging system imageData structure */
  728. struct gxVectorImageDataRec {
  729.     gxVectorRenderOptions             renderOptions;                /* Options to control rendering: color sort, clipping, etc. */
  730.     Fixed                             devRes;                        /* Device resolution */
  731.     gxTransform                     devTransform;                /* Mapping, clip and halftoning information for colored bitmaps */
  732.     gxColorSet                         clrSet;                        /* Entire set of colors; usually indexed color space for pen plotters */
  733.     gxColor                         bgColor;                    /* The background color in the color space specified by the clrSpace field */
  734.     gxVHalftoneRec                     halftoneInfo;                /* Defines halftone information for color bitmaps */
  735.     gxPenTableHdl                     hPenTable;                    /* Complete list of pens along with their pen positions and thickness */
  736.     gxRectangle                     pageRect;                    /* Page dimensions */
  737.     gxVectorShapeDataRec             shapeData;                    /* Information on how to render a shape */
  738. };
  739. typedef struct gxVectorImageDataRec gxVectorImageDataRec;
  740.  
  741. typedef gxVectorImageDataRec *gxVectorImageDataPtr;
  742. typedef gxVectorImageDataPtr *gxVectorImageDataHdl;
  743. /* Constants for renderOptions field in gxVectorImageDataRec. */
  744.  
  745. enum {
  746.     gxColorSort                    = 0x00000001,                    /* Set for pen plotters */
  747.     gxATransferMode                = 0x00000002,                    /* Set if transfer modes need to be resolved */
  748.     gxNoOverlap                    = 0x00000004,                    /* Set if non-overlapping output is desired*/
  749.     gxAColorBitmap                = 0x00000008,                    /* Set if color bitmap output is desired */
  750.     gxSortbyPenPos                = 0x00000010,                    /* Set if shapes are to be drawn in the order of the pen index */
  751.                                                                 /* in the pen table. NOTE: this is not the pen position in the carousel */
  752.     gxPenLessPlotter            = 0x00000020,                    /* Indicates raster printer/plotter */
  753.     gxCutterPlotter                = 0x00000040,                    /* Indicates cutter */
  754.     gxNoBackGround                = 0x00000080                    /* Set if shapes that map to the background color should not be sent to driver */
  755. };
  756.  
  757. /*
  758.  ------------------------------------------------------------------------------
  759.  
  760.                                 Vector Driver Imaging Messages
  761.  
  762. -------------------------------------------------------------------------------- 
  763. */
  764. #define Send_GXVectorPackageShape(theShape, penIndex) \
  765.         SendMessage(0x00010000, theShape, penIndex)
  766.  
  767. #define Forward_GXVectorPackageShape(theShape, penIndex) \
  768.         ForwardThisMessage((void *) (theShape), (void *) (penIndex))
  769.  
  770. #define Send_GXVectorLoadPens(penTable, shapeCounts, penTableChanged) \
  771.         SendMessage(0x00010001, penTable, shapeCounts, penTableChanged)
  772.  
  773. #define Forward_GXVectorLoadPens(penTable, shapeCounts, penTableChanged) \
  774.         ForwardThisMessage((void *) (penTable), (void *) (shapeCounts), (void *) (penTableChanged))
  775.  
  776. #define Send_GXVectorVectorizeShape(theShape, penIndex, vectorData) \
  777.         SendMessage(0x00010002, theShape, penIndex, vectorData)
  778.  
  779. #define Forward_GXVectorVectorizeShape(theShape, penIndex, vectorData) \
  780.         ForwardThisMessage((void *) (theShape), (void *) (penIndex), (void *) (vectorData))
  781. /*
  782.  ------------------------------------------------------------------------------
  783.  
  784.                             PostScript Driver Contants and Types
  785.  
  786. -------------------------------------------------------------------------------- 
  787. */
  788.  
  789. enum {
  790.     gxPostSynonym                = 'post'
  791. };
  792.  
  793. /* PostScript glyphs record */
  794. struct gxPrinterGlyphsRec {
  795.  
  796.     gxFont                             theFont;                    /*  ---> Font reference */
  797.     long                             nGlyphs;                    /*  ---> Number of glyphs in the font */
  798.     gxFontPlatform                     platform;                    /* <---  How printer font is encoded */
  799.     gxFontScript                     script;                        /* <---  Script if platform != glyphPlatform */
  800.     gxFontLanguage                     language;                    /* <---  Language if platform != glyphPlatform */
  801.     long                             vmUsage;                    /* <---  How much PostScript VM font uses */
  802.  
  803.                                                                 /* Size of this array is long-alligned(nGlyphs) */
  804.     unsigned long                     glyphBits[1];                /* <---  Bit array of which system glyphs are in printer */
  805.  
  806. };
  807. typedef struct gxPrinterGlyphsRec gxPrinterGlyphsRec;
  808.  
  809. /* PostScript device rendering information */
  810. typedef long gxPostScriptRenderOptions;
  811. struct gxPostScriptImageDataRec {
  812.     short                             languageLevel;                /* PostScript language level */
  813.     gxColorSpace                     devCSpace;                    /* The printer's color space */
  814.     gxColorProfile                     devCProfile;                /* The printer's color profile for matching */
  815.     gxPostScriptRenderOptions         renderOptions;                /* Options for the imaging system */
  816.     long                             pathLimit;                    /* Maximum path size */
  817.     short                             gsaveLimit;                    /* Maximum number of gsaves allowed */
  818.     short                             opStackLimit;                /* Operand stack limit */
  819.     scalerStreamTypeFlag             fontType;                    /* These are the font types that the printer supports  */
  820.     long                             printerVM;                    /* How much memory is in the printer */
  821.     long                             reserved0;
  822. };
  823. typedef struct gxPostScriptImageDataRec gxPostScriptImageDataRec;
  824.  
  825. typedef gxPostScriptImageDataRec *gxPostScriptImageDataPtr;
  826. typedef gxPostScriptImageDataPtr *gxPostScriptImageDataHdl;
  827. /* Constants for renderOptions field in gxPostScriptImageDataRec. */
  828.  
  829. enum {
  830.     gxNeedsHexOption            = 0x00000001,                    /* Convert all binary data to hex */
  831.     gxNeedsCommentsOption        = 0x00000002,                    /* Issue PostScript comments */
  832.     gxBoundingBoxesOption        = 0x00000004,                    /* Calculate the values for */
  833.     gxPortablePostScriptOption    = 0x00000008,                    /* Generate portable PostScript */
  834.     gxTextClipsToPathOption        = 0x00000010,                    /* Convert all clips that are composed of text to path shapes */
  835.     gxFlattenClipPathOption        = 0x00000020,                    /* Convert all clips that are path shapes to polygons (helps better control point limit) */
  836.     gxUseCharpath1Option        = 0x00000040,                    /* (ignored if text clips are converted to paths)  When the clip is text,  */
  837.                                                                 /* Do it one glyph at a time, redrawing the main shape each time */
  838.     gxUseLevel2ColorOption        = 0x00000080,                    /* When printing to level-2 use level-2 device independent color */
  839.     gxNoEPSIllegalOperators        = 0x00000100,                    /* Don't use any operators prohibited by the Encapsulated PostScript File Format V3.0 */
  840.     gxEPSTargetOption            = gxNoEPSIllegalOperators + gxNeedsCommentsOption + gxBoundingBoxesOption /* PostScript intended for EPS Use. */
  841. };
  842.  
  843. /* Structure for gxPostScriptGetProcSetList / gxPostScriptDownLoadProcSetList */
  844. struct gxProcSetListRec {
  845.     gxOwnerSignature                 clientid;
  846.     OSType                             controlType;                /* The driver will call FetchTaggedData on each of these resources */
  847.     short                             controlid;
  848.     OSType                             dataType;
  849.     long                             reserved0;
  850. };
  851. typedef struct gxProcSetListRec gxProcSetListRec;
  852.  
  853. typedef gxProcSetListRec *gxProcSetListPtr;
  854. typedef gxProcSetListPtr *gxProcSetListHdl;
  855. /* Possible results of querying printer (returned by gxPostScriptQueryPrinter message) */
  856.  
  857. enum {
  858.     gxPrinterOK                    = 0,
  859.     gxIntializePrinter            = 1,
  860.     gxFilePrinting                = 2,
  861.     gxResetPrinter                = 128
  862. };
  863.  
  864. /*
  865.  ------------------------------------------------------------------------------
  866.  
  867.                                 PostScript Driver Imaging Messages
  868.  
  869. -------------------------------------------------------------------------------- 
  870. */
  871. /* Device control messages */
  872. #define Send_GXPostScriptQueryPrinter(queryData) \
  873.         SendMessage(0x00010000, queryData)
  874.  
  875. #define Forward_GXPostScriptQueryPrinter(queryData) \
  876.         ForwardThisMessage((void *) (queryData))
  877.  
  878.  
  879. #define Send_GXPostScriptInitializePrinter() \
  880.         SendMessage(0x00010001)
  881.  
  882. #define Forward_GXPostScriptInitializePrinter() \
  883.         ForwardThisMessage((void *) (0))
  884.  
  885.  
  886. #define Send_GXPostScriptResetPrinter() \
  887.         SendMessage(0x00010002)
  888.  
  889. #define Forward_GXPostScriptResetPrinter() \
  890.         ForwardThisMessage((void *) (0))
  891.  
  892.  
  893. #define Send_GXPostScriptExitServer() \
  894.         SendMessage(0x00010003)
  895.  
  896. #define Forward_GXPostScriptExitServer() \
  897.         ForwardThisMessage((void *) (0))
  898.  
  899. /* Device communication messages */
  900. #define Send_GXPostScriptGetStatusText(textHdl) \
  901.         SendMessage(0x00010004, textHdl)
  902.  
  903. #define Forward_GXPostScriptGetStatusText(textHdl) \
  904.         ForwardThisMessage((void *) (textHdl))
  905.  
  906.  
  907. #define Send_GXPostScriptGetPrinterText(textHdl) \
  908.         SendMessage(0x00010005, textHdl)
  909.  
  910. #define Forward_GXPostScriptGetPrinterText(textHdl) \
  911.         ForwardThisMessage((void *) (textHdl))
  912.  
  913.  
  914. #define Send_GXPostScriptScanStatusText(textHdl) \
  915.         SendMessage(0x00010006, textHdl)
  916.  
  917. #define Forward_GXPostScriptScanStatusText(textHdl) \
  918.         ForwardThisMessage((void *) (textHdl))
  919.  
  920.  
  921. #define Send_GXPostScriptScanPrinterText(textHdl) \
  922.         SendMessage(0x00010007, textHdl)
  923.  
  924. #define Forward_GXPostScriptScanPrinterText(textHdl) \
  925.         ForwardThisMessage((void *) (textHdl))
  926. /* Proc set management messages */
  927. #define Send_GXPostScriptGetDocumentProcSetList(procSet, imageDataHdl) \
  928.         SendMessage(0x00010008, procSet, imageDataHdl)
  929.  
  930. #define Forward_GXPostScriptGetDocumentProcSetList(procSet, imageDataHdl) \
  931.         ForwardThisMessage((void *) (procSet), (void *) (imageDataHdl))
  932.  
  933. #define Send_GXPostScriptDownloadProcSetList(procSet, imageDataHdl) \
  934.         SendMessage(0x00010009, procSet, imageDataHdl)
  935.  
  936. #define Forward_GXPostScriptDownloadProcSetList(procSet, imageDataHdl) \
  937.         ForwardThisMessage((void *) (procSet), (void *) (imageDataHdl))
  938. /* Font management messages */
  939. #define Send_GXPostScriptGetPrinterGlyphsInformation(glyphsInfo) \
  940.         SendMessage(0x0001000A, glyphsInfo)
  941.  
  942. #define Forward_GXPostScriptGetPrinterGlyphsInformation(glyphsInfo) \
  943.         ForwardThisMessage((void *) (glyphsInfo))
  944.  
  945.  
  946. #define Send_GXPostScriptStreamFont(fontref, streamPtr) \
  947.         SendMessage(0x0001000B, fontref, streamPtr)
  948.  
  949. #define Forward_GXPostScriptStreamFont(fontref, streamPtr) \
  950.         ForwardThisMessage((void *) (fontref), (void *) (streamPtr))
  951. /* Document structuring and formatting messages */
  952. #define Send_GXPostScriptDoDocumentHeader(imageDataHdl) \
  953.         SendMessage(0x0001000C, imageDataHdl)
  954.  
  955. #define Forward_GXPostScriptDoDocumentHeader(imageDataHdl) \
  956.         ForwardThisMessage((void *) (imageDataHdl))
  957.     
  958. #define Send_GXPostScriptDoDocumentSetup(imageDataHdl) \
  959.         SendMessage(0x0001000D, imageDataHdl)
  960.  
  961. #define Forward_GXPostScriptDoDocumentSetup(imageDataHdl) \
  962.         ForwardThisMessage((void *) (imageDataHdl))
  963.  
  964. #define Send_GXPostScriptDoDocumentTrailer(imageDataHdl) \
  965.         SendMessage(0x0001000E, imageDataHdl)
  966.  
  967. #define Forward_GXPostScriptDoDocumentTrailer(imageDataHdl) \
  968.         ForwardThisMessage((void *) (imageDataHdl))
  969. /* Page structuring and formatting messages */
  970. #define Send_GXPostScriptDoPageSetup(pageFormat, thePage, imageDataHdl) \
  971.         SendMessage(0x0001000F, pageFormat, thePage, imageDataHdl)
  972.  
  973. #define Forward_GXPostScriptDoPageSetup(pageFormat, thePage, imageDataHdl) \
  974.         ForwardThisMessage((void *) (pageFormat), (void *) (thePage), (void *) (imageDataHdl))
  975.  
  976. #define Send_GXPostScriptSelectPaperType(thePapertype, thePage, imageDataHdl) \
  977.         SendMessage(0x00010010, thePapertype, thePage, imageDataHdl)
  978.  
  979. #define Forward_GXPostScriptSelectPaperType(thePapertype, thePage, imageDataHdl) \
  980.         ForwardThisMessage((void *) (thePapertype), (void *) (thePage), (void *) (imageDataHdl))
  981.  
  982. #define Send_GXPostScriptDoPageTrailer(imageDataHdl) \
  983.         SendMessage(0x00010011, imageDataHdl)
  984.  
  985. #define Forward_GXPostScriptDoPageTrailer(imageDataHdl) \
  986.         ForwardThisMessage((void *) (imageDataHdl))
  987.  
  988. #define Send_GXPostScriptEjectPage(thePapertype, pagenumber, copiescount, erasepage, imageDataHdl) \
  989.         SendMessage(0x00010012, thePapertype, pagenumber, copiescount, erasepage, imageDataHdl)
  990.  
  991. #define Forward_GXPostScriptEjectPage(thePapertype, pagenumber, copiescount, erasepage, imageDataHdl) \
  992.         ForwardThisMessage((void *) (thePapertype), (void *) (pagenumber), (void *) (copiescount), \
  993.                            (void *) (erasepage), (void *) (imageDataHdl))
  994.  
  995. #define Send_GXPostScriptEjectPendingPage(pageWasEjected) \
  996.         SendMessage(0x00010014, pageWasEjected)
  997.  
  998. #define Forward_GXPostScriptEjectPendingPage(pageWasEjected) \
  999.         ForwardThisMessage((void *) (pageWasEjected))
  1000. /* Shape imaging messages */
  1001. #define Send_GXPostScriptProcessShape(page, trcount, trlist) \
  1002.         SendMessage(0x00010013, page, trcount, trlist)
  1003.  
  1004. #define Forward_GXPostScriptProcessShape(page, trcount, trlist) \
  1005.         ForwardThisMessage((void *) (page), (void *) (trcount), (void *) (trlist))
  1006. /*
  1007.  ------------------------------------------------------------------------------
  1008.  
  1009.                                             Driver API Functions
  1010.  
  1011. -------------------------------------------------------------------------------- 
  1012. */
  1013. /* Constants for printer gxViewDevice bitmaps. */
  1014.  
  1015. enum {
  1016.     gxMissingImagePointer        = -4
  1017. };
  1018.  
  1019. extern OSErr GXAddPrinterViewDevice(gxPrinter thePrinter, gxViewDevice theViewDevice)
  1020.  FOURWORDINLINE(0x203C, 0x0002, 0x0000, 0xABFE);
  1021.  
  1022. extern OSErr GXGetAvailableJobFormatModes(gxJobFormatModeTableHdl *theFormatModes)
  1023.  FOURWORDINLINE(0x203C, 0x0002, 0x0001, 0xABFE);
  1024.  
  1025. extern OSErr GXSetPreferredJobFormatMode(gxJobFormatMode theFormatMode, Boolean directOnly)
  1026.  FOURWORDINLINE(0x203C, 0x0002, 0x0002, 0xABFE);
  1027.  
  1028. #endif
  1029. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  1030. extern OSErr GXPrintingAlert(long iconId, long txtSize, long defaultTitleNum, long cancelTitleNum, long textLength, Ptr pAlertMsg, StringPtr actionTitle, StringPtr title2, StringPtr title3, StringPtr msgFont, ModalFilterUPP filterProc, short *itemHit, StringPtr alertTitle)
  1031.  FOURWORDINLINE(0x203C, 0x0002, 0x0003, 0xABFE);
  1032.  
  1033. extern OSErr GXGetPrintingAlert(long alertResId, ModalFilterUPP filterProc, short *itemHit)
  1034.  FOURWORDINLINE(0x203C, 0x0002, 0x0004, 0xABFE);
  1035.  
  1036. #endif
  1037. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  1038. extern OSErr GXFetchDTPData(Str31 dtpName, OSType theType, long theID, Handle *theData)
  1039.  FOURWORDINLINE(0x203C, 0x0002, 0x0005, 0xABFE);
  1040.  
  1041. extern OSErr GXWriteDTPData(Str31 dtpName, OSType theType, long theID, Handle theData)
  1042.  FOURWORDINLINE(0x203C, 0x0002, 0x0006, 0xABFE);
  1043.  
  1044. #endif
  1045. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  1046. extern OSErr GXHandleChooserMessage(gxJob *aJob, Str31 driverName, long message, long caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2)
  1047.  FOURWORDINLINE(0x203C, 0x0002, 0x0007, 0xABFE);
  1048.  
  1049. #endif
  1050.  
  1051. #if PRAGMA_ALIGN_SUPPORTED
  1052. #pragma options align=reset
  1053. #endif
  1054.  
  1055. #if PRAGMA_IMPORT_SUPPORTED
  1056. #pragma import off
  1057. #endif
  1058.  
  1059. #ifdef __cplusplus
  1060. }
  1061. #endif
  1062.  
  1063. #endif /* __GXPRINTERDRIVERS__ */
  1064.  
  1065.